﻿// <copyright file="ComparsionType.cs" company="Lu Studio">
// Copyright (c) Lu Studio. All rights reserved.
// </copyright>
// <author>lu qi</author>
// <createTime>2021-06-26</createTime>

namespace ElfKit.Common
{
    using System.Collections.ObjectModel;

    /// <summary>
    /// <see cref="ComparsionType"/>扩展.
    /// </summary>

    public static class ComparsionTypeExtensions
    {
        /// <summary>
        /// 获得<see cref="ComparsionType"/>的描述.
        /// </summary>
        /// <param name="comparsionType"></param>
        /// <returns>描述.</returns>
        public static string GetDescription(this ComparsionType comparsionType)
        {
            ReadOnlyDictionary<long, string> map = EnumUtil.GetValueToDescriptionMap(typeof(ComparsionType));
            long value = (long)comparsionType;
            return map[value];
        }
    }
}